
/* <<< COPYRIGHT START >>>
 * Copyright 2006-Present OxygenSoftwareLibrary.com
 * Licensed under the GNU Lesser General Public License.
 * http://www.gnu.org/licenses/lgpl.html
 * 
 * @author: Ugorji Dick-Nwoke
 * <<< COPYRIGHT END >>>
 */


package oxygen.markup.macros;

import java.io.Writer;

import oxygen.markup.MarkupConstants;
import oxygen.markup.MarkupMacroParameters;
import oxygen.markup.MarkupRenderContext;
import oxygen.markup.MarkupUtils;
import oxygen.web.WebLocal;

public class AsisMacro extends GenericMarkupMacro {
  public void doExecute(Writer writer, MarkupRenderContext rc, MarkupMacroParameters params) throws Exception {
    if(MarkupUtils.getBooleanFromRenderContext(rc, MarkupConstants.AS_IS_SUPPORTED_KEY, true)) {
      writer.write(params.getContent());
    } else {
      writer.write((WebLocal.getI18n().str("general.content_unavailable")));
    }
  }
}

